package com.sias.serviceclient.service;

import com.sias.model.model.entity.Question;
import com.sias.model.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 123
 * @description 针对表【question(题目)】的数据库操作Service
 * @createDate 2023-12-01 17:13:44
 */
@FeignClient(name = "oj-question-service", path = "/api/question/inner")
public interface QuestionFeignClient {

  @GetMapping("/question_submit/get/id")
  QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") long questionSubmitId);

  @GetMapping("/get/id")
  Question getQuestionById(@RequestParam("questionId") Long questionId);

  @PostMapping("/question_submit/update")
  boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmitUpdate);

}
